<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.1.1/jquery.js"></script> -->
   <script src="./axios.js"></script>
</head>
<body>
    <ul><li>
        你好
    </li></ul>

    <script>
        //es6 新加的

    //   fetch('http:localhost:3001/home?date='+new Date()).then(res=>res.json()).then(res=>{
    //       console.log(res)
    //   })
    //传统的 
    // $.ajax({
    //     dataType:'json',
    //     url:'http:localhost:3001/home?date='+new Date(),
    //     success:function(res) {
    //         console.log(res)

    //     }
    // })
let url='http:localhost:3001/home?date='+new Date()
      axios.get(url).then(res=>{
          console.log(res.data)
      })

    </script>
</body>
</html>